/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package argtrust.argsys;
import argtrust.trustnet.Agent;

/**
 *
 * @author Yuqing Tang
 */
public class LabelGroundedSemantics extends LabelSemantics {

    public LabelGroundedSemantics(ArgumentationSystem arg_sys,
            IBeliefArgumentSemantics arg_belief) {
        super(arg_sys, arg_belief);
    }
        /**
     * TODO: Need a mechanism to avoid compute the status of the same argument many times.
     * @param agent
     * @param argument
     * @return
     */
    public ArgumentStatus getStatus(Agent agent, Argument argument) {
        LabelStatus res = computeStatus_(agent, argument, 0);
        if (res.isFinal()) {
            return res;
        }
        for (int i = 0; i < mDiameter; ++i) {
            mDoneSomeRefined = false;
            res = refineStatus_(agent, argument);
            if (mDoneSomeRefined == false) {
                break;
            }
        }
        res.setFinal();
        return res;
    }

}
